<template>
	<router-view v-slot="{ Component }">
		<keep-alive :include="includes">
			<component :is="Component" />
		</keep-alive>
	</router-view>
</template>

<script>
	import {
		computed,
	} from 'vue'
	import {
		useStore
	} from 'vuex'
	export default {
		setup() {
			const store = useStore()
			const includes = computed(() => {
				return store.state.tabs.filter(item => item.meta && item.meta.useCache).map(item =>
					item.name)
			})
			return {
				includes
			}
		}
	}
</script>

<style>
</style>
